
Setext Help

                                          help authors: Donavan Hall,
                                                        Craig Barton Upright,

                                          help version: 2.3
                                               created: 00-12-07 11.55.16 
                                           last update: 09/28/2001 {23:05:03 PM} 
    

	  	Table Of Contents


"# Introduction"
"# Summary of how the file marking works"
"# The Setext Menu"
"# Additional Preferences"
"#   Comment Characters"
"#   # Magic Characters"
"#   # Keywords"
"#   # Command Double Click"

<<floatNamedMarks>>



	================================================================


	  	Introduction




Setext stands for Structure Enhanced Text.  It is a markup scheme for plain
text documents such as email messages and e-zines.  Setext's primary goal
is to provide a way of marking text that is visually unobtrusive, so that
if you don't have a special setext browser, like EasyView, you can still
read the text.  (Have you ever tried to make sense of HTML source without
your web browswer?)

The "Setext Example.stx" demonstration file is a description of setext
concepts written by Ian Feldman.  Setext grabbed a foothold in the Mac world
with the online publication TidBITS. Rudimentary setext browsers were built
with HyperCard for reading TidBITS. Setext seems to be merely a historical
curiousity now.

Alpha's Setext mode not only facilitates marking of Setext files, but also
provides a handy menu for file navigation, template insertion, and utilities
to create Setext mark-up tags.  If you write a lot of text documents and
wished you could mark them with Alpha's mark menu (the little box up in the
righthand corner of the window with the M in it), then you might find the
Setext mode useful.


	  	Summary of how the file marking works

Any two lines that look like this:

Any string of words
===================


will be marked as a Chapter heading.  Any two lines that look like this:

Any other string of words
-------------------------


will be marked as a Section heading.  That's all there is to it.

The key bindings <command>-<=> and <command>-<-> will turn the current
line into a chapter or heading, and remark the file.


	  	The Setext Menu

Alpha's Setext menu has been designed to provide a set of tools that
enhance the writing of standard Text documents.

[more info to be added later.]


	  	Additional Preferences

Alpha's Setext mode is useful even if you are not editing Setext documents.
You can set additional preferences, including comment characters, magic
characters, keyword definitions, keyword symbols and "string" colors.

All of this can be done via the " Config --> Mode Prefs --> Preferences "
dialog box.  In some ways, Setx could be thought of as "Text2", with the
same functionality, but greater customization available.  If Alpha does not
have a mode that you need, Setx could be adapted to serve as a surrogate
until you've convinced someone to write one for you.


	  		 Comment Characters

Setext per se has no comment character, but I often use one in my
README.TXT files.  Setx's Mode Preferences now allows the user to define
both a single comment character (like this: # ), as well as paired (or
bracketed) comment characters. 

This is an example of /* bracketed comments */, which can also /* extend 
over 
several */ lines.


Any Section or Subsection heading which is preceded by the single comment 
character, as indicated below, will be colorized, but the comment character 
(and any leading white-spaces) will be stripped from the mark.


	  		 # Magic Characters

The user can also specify one (and only one) "magic character."  Anything
appearing after the magic character and before the next space will be
colored according to the "magic color" preference.  $This is an example of 
how one could use the $ sign as a magic character.


	  		 # Keywords

Setx now allows the user to define string colors and set keyword
dictionaries as well through the " Mode Prefs --> Preferences " dialog. 
Three levels of keywords are available, as well as a symbols category (for
characters such as @ or %).

If the lists of desired keywords is rather long, the user might rather
include them in a separate SetxPrefs files.  To create one, go to
" Config --> Mode Prefs --> Edit Prefs File ",  and add these lines:


regModeKeywords -a -k $SetxmodeVars(keyword1Color) \
  Setx  {blah bladdity} 

regModeKeywords -a -k $SetxmodeVars(keyword2Color) \
  Setx  {blah2 bladdity2} 

regModeKeywords -a -k $SetxmodeVars(keyword3Color) \
  Setx  {blah3 bladdity3} 

regModeKeywords -a -k $SetxmodeVars(symbolColor)   \
  Setx  {! ^} 

Setx::colorizeSetx


Include as many keywords as desired within the braces, separating each
keyword by at least one space or carriage return.  After editing a
SetxPrefs.tcl file, you must " Config --> Mode Prefs --> Load Prefs File ". 
Alpha will automatically load this preferences file when it restarts.

Note that deletions from any user-defined keyword dictionaries will only
take effect upon restart -- keywords cannot be "unloaded".

The default mode preferences are intended to show off some of Setx's new
functionality, which can be observed in this help file.  All of these 
preferences could be set empty if desired.


	  		 # Command Double Click

Setx mode contains four "Search Url" preferences that are initially set to 
four different popular web search engines.  Command double-clicking on any 
text will send it to "Search Url 1".  Holding down any modifier key will 
send the text to a different search url, using the table below:

option key:     Search Url 2
control key:    Search Url 3
shift key:      Search Url 4

Note that command double-clicking with NO modifier keys can also be accessed 
using the F6 key binding.  This means that one can first highlight text, and 
then hit F6 to send a phrase to the first search url.  The other modifiers, 
however, can only send the word surrounding the current cursor point.
   